package com.tenbent.product.center.insures.dto;

import com.tenbent.product.base.dto.BaseDto;
import com.tenbent.product.center.insures.bo.SafeguardPackageDetail;
import org.hibernate.validator.constraints.NotEmpty;

/**
 * 保障套餐保额
 *
 * @author Randy
 * 
 *         Created by ThinkPad on 2017/8/21.
 */
public class SafeguardPackageDetailDto extends BaseDto {

	/** 套餐代码 */
	@NotEmpty(message = "{safeguard.package.detail.package.code.not.empty}")
	private String packageCode;

	/** 保障项目代码 */
	@NotEmpty(message = "{safeguard.package.detail.category.code.not.empty}")
	private String categoryCode;

	/** 保障额度 */
	@NotEmpty(message = "{safeguard.package.detail.amount.not.empty}")
	private String amount;

	public SafeguardPackageDetailDto() {

	}

	public SafeguardPackageDetailDto(SafeguardPackageDetail safeguardPackageDetail) {
		super(safeguardPackageDetail);
		setPackageCode(safeguardPackageDetail.getPackageCode());
		setCategoryCode(safeguardPackageDetail.getCategoryCode());
		setAmount(safeguardPackageDetail.getAmount());
	}

	public SafeguardPackageDetail transToBo() {
		SafeguardPackageDetail safeguardPackageDetail = new SafeguardPackageDetail();
		super.transToBo(safeguardPackageDetail);
		safeguardPackageDetail.setPackageCode(this.getPackageCode());
		safeguardPackageDetail.setCategoryCode(this.getCategoryCode());
		safeguardPackageDetail.setAmount(this.getAmount());
		return safeguardPackageDetail;
	}

	public String getPackageCode() {
		return packageCode;
	}

	public void setPackageCode(String packageCode) {
		this.packageCode = packageCode;
	}

	public String getCategoryCode() {
		return categoryCode;
	}

	public void setCategoryCode(String categoryCode) {
		this.categoryCode = categoryCode;
	}

	public String getAmount() {
		return amount;
	}

	public void setAmount(String amount) {
		this.amount = amount;
	}
}
